/*
 * Endless Code License
 * Copyright (C) 2009 Jingul, Kim
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef ECCONTEXT_H_
#define ECCONTEXT_H_

#include "ecDisplay.h"

#ifdef __cplusplus
extern "C" {
#endif

struct EC_CONTEXT {
#ifdef WIN32
	HDC hDC;
	HGLRC hRC;
#elif defined(EC_X11)
#elif defined(EC_MAC)
#endif
};

JNIEXPORT jboolean JNICALL Java_ec_sys_Context_make(JNIEnv *, jobject, jint);

JNIEXPORT jboolean JNICALL Java_ec_sys_Context_release(JNIEnv *, jobject);

JNIEXPORT void JNICALL Java_ec_sys_Context_swapBuffer(JNIEnv *, jobject);

void setDCPixelFormat(struct EC_CONTEXT *context);

struct EC_CONTEXT* getContext(JNIEnv*, jobject);

#ifdef __cplusplus
}
#endif

#endif /* ECCONTEXT_H_ */
